package com.nfit.shopadmin.configure;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * ClassName:OpenApiConfigure
 * Package:com.nfit.shopweb.configure
 * Description
 *
 * @Author L
 * @Create 2024/11/15 19:55
 */
@Configuration
public class OpenApiConfigure {

    /**
     * .title("天天商城项目API文档") 标题
     *  .version("v1.0") 版本
     *  .contact(new Contact().name("廖"))); 作者
     * @return
     */
    @Bean
    public OpenAPI openAPI() {
        return new OpenAPI().info(new Info().title("天天商城项目API文档")
                                            .version("v1.0")
                                            .description("本项目基于springBoot开发的项目API文档")
                                            .license(new License().name("MIT").url("http://springdoc.org"))
                                            .contact(new Contact().name("廖")));
    }


}
